package com.aiobc.business.dataInfo.service.impl;

import java.util.List;

import com.aiobc.business.dataInfo.mapper.DataApprovalMapper;
import com.aiobc.business.dataInfo.service.IDataApprovalService;
import com.aiobc.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aiobc.business.dataInfo.domain.DataApproval;

/**
 * 数据审批Service业务层处理
 * 
 * @author xc
 * @date 2021-10-22
 */
@Service
public class DataApprovalServiceImpl implements IDataApprovalService
{
    @Autowired
    private DataApprovalMapper dataApprovalMapper;

    /**
     * 查询数据审批
     * 
     * @param approvalId 数据审批主键
     * @return 数据审批
     */
    @Override
    public DataApproval selectDataApprovalByApprovalId(String approvalId)
    {
        return dataApprovalMapper.selectDataApprovalByApprovalId(approvalId);
    }

    /**
     * 查询数据审批列表
     * 
     * @param dataApproval 数据审批
     * @return 数据审批
     */
    @Override
    public List<DataApproval> selectDataApprovalList(DataApproval dataApproval)
    {
        return dataApprovalMapper.selectDataApprovalList(dataApproval);
    }

    /**
     * 新增数据审批
     * 
     * @param dataApproval 数据审批
     * @return 结果
     */
    @Override
    public int insertDataApproval(DataApproval dataApproval)
    {
        return dataApprovalMapper.insertDataApproval(dataApproval);
    }

    /**
     * 修改数据审批
     * 
     * @param dataApproval 数据审批
     * @return 结果
     */
    @Override
    public int updateDataApproval(DataApproval dataApproval)
    {
        return dataApprovalMapper.updateDataApproval(dataApproval);
    }

    /**
     * 批量删除数据审批
     * 
     * @param approvalIds 需要删除的数据审批主键
     * @return 结果
     */
    @Override
    public int deleteDataApprovalByApprovalIds(String approvalIds)
    {
        return dataApprovalMapper.deleteDataApprovalByApprovalIds(Convert.toStrArray(approvalIds));
    }

    /**
     * 删除数据审批信息
     * 
     * @param approvalId 数据审批主键
     * @return 结果
     */
    @Override
    public int deleteDataApprovalByApprovalId(String approvalId)
    {
        return dataApprovalMapper.deleteDataApprovalByApprovalId(approvalId);
    }
}
